package com.design.mode.single;

/**
 * 饿汉式
 * @Date 2023/3/29 15:08:19
 * @Author luopeng
 */
public class SingleObject {

    private static final SingleObject OBJECT = new SingleObject();

    private SingleObject() {}

    public static SingleObject getSingleObject() {
        return OBJECT;
    }

    public void showMessage() {
        System.out.println("Hello, World!");
    }
}
